package org.mtmi.ui.controls.edits;

import java.util.ArrayList;
import java.util.List;

import org.mtmi.ui.actions.ActionFactory;
import org.mtmi.ui.actions.IAction;
import org.mtmi.ui.controls.Keyboard;
import org.mtmi.ui.edit.AbstractSourceControlConnector;
import org.mtmi.ui.edit.IControlEditor;

public class KeyboardControlEditor implements IControlEditor
{
	private Keyboard k;
	
	public KeyboardControlEditor( Keyboard kb ) {
		k = kb;
	}
	
	public Keyboard getKeyboard() { return k; }
	
	@Override
	public List<IAction> getControlActions() {
		ArrayList<IAction> actions = new ArrayList<IAction>();
		actions.add( ActionFactory.KEYBOARD_ADD_OCTAVE );
		actions.add( ActionFactory.KEYBOARD_REMOVE_OCTAVE );
		return actions;
	}
	
	@Override
	public List<AbstractSourceControlConnector> getControlConnectors() {
		ArrayList<AbstractSourceControlConnector> con = new ArrayList<AbstractSourceControlConnector>();
		con.add( new KeyboardTransposeConnector( k, 0 ) );
		return con;
	}
}
